package com.gang.mars.basic.function;

/**
 * @author gang.chen
 * @description
 * @Date 2021/7/15 13:31
 */
public class FunctionTest01 {

    public static void main(String[] args) {
        //类实现泛型接口
        Peach02 peach02 = new Peach02();
        String apple = peach02.apple(100);
        System.out.println(apple);

        /**
         * T 型参指向为String
         * R 型参指定为Integer
         *
         * R为返回型参类型 Integer
         * */
        Peach01<String,Integer> peach010 = String::length;
        Peach01<String,Integer> peach011 = peach012->peach012.length();

        /**
         * T 型参为Integer
         * R 型参为String
         *
         * R 返回对象类型为 String
         * */
        Peach01<Integer,String> peach012 = Integer::toHexString;
        Peach01<Integer,String> peach013 = peach014-> String.valueOf(peach014.intValue());
    }



}
